package demo;

import com.stu.utils.PicUtils;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.Test;

/**
 * @author zhuzi 2022/6/15 18:45
 */
public class ComparePic {

    @Test
    public void comparePic() throws IOException {
        byte[] bytes = FileUtils.readFileToByteArray(new File("/Users/zhuzi/1.jpg"));
        byte[] picForScale = PicUtils.compressPicForScale(bytes, 100);
        FileUtils.writeByteArrayToFile(new File("/Users/zhuzi/2.jpg"), picForScale);
    }
}
